<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>Document</title>
	<style type="text/css">
	#box{
		width: 400px;
		height: 400px;
		background-color: black;
	}
	.box{
		width: 200px;
		height: 200px;
		background-color: red;
	}



	</style>
	<script type="text/javascript">
	 window.onload=function  () {
/*	 	var box = document.getElementById('box')
	 	box.style.backgroundColor="blue";
	 	var bo = document.getElementsByClassName("box")
	 	bo[0].style.backgroundColor="black";
	 	var b = document.getElementsByTagName("P")
	 	b[0].style.backgroundColor="red";
	 	var o =document.getElementsByName("usrename")
	 	o[0].style.backgroundColor="black";*/
	 	var box = document.getElementById('box')
	 	box.onmouseover = function  () {
	 		box.style.backgroundColor="blue";
	 	}
	 	box.onmouseout = function  () {
	 		box.style.backgroundColor="green";
	 	}
	 /*	box.onclick =function  () {
	 		document.write("123")
	 	}*/
	 	box.ondblclick  =function  () {
	 		alert(123)
	 	}
	 }
/*	function run () {
		var i = 0
		alert(134)
		if (true) {};
	}
	var time = setInterval(run, 2000);*/



	</script>	
</head>
<body>
	<div id="box">
		<div class="box">
			<p name='usrename'>哈哈哈哈哈</p>
		</div>
	</div>
	
</body>
</html>